package com.shop.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.math.BigDecimal;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 购物车 实体类。
 *
 * @author 彭新才 
 * @since 2024-10-15
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "购物车")
@Table(value = "shop_user_cart")
public class ShopUserCart implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增id
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "自增id")
    private Long id;

    /**
     * 用户id
     */
    @Schema(description = "用户id")
    private Long userId;

    /**
     * 商品id
     */
    @Schema(description = "商品id")
    private Long productId;

    /**
     * 标题
     */
    @Schema(description = "标题")
    private String title;

    /**
     * 封面图片
     */
    @Schema(description = "封面图片")
    private String images;

    /**
     * 原价
     */
    @Schema(description = "原价")
    private BigDecimal originalPrice;

    /**
     * 销售价格
     */
    @Schema(description = "销售价格")
    private BigDecimal price;

    /**
     * 购买数量
     */
    @Schema(description = "购买数量")
    private Long stock;

    /**
     * 规格
     */
    @Schema(description = "规格")
    private String spec;

    /**
     * 添加时间
     */
    @Schema(description = "添加时间")
    private Long addTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private Long updTime;

}
